From 5e52b4ff8d8643b400b6fc8fbb1747343d55f388 Mon Sep 17 00:00:00 2001 From: "tsteven4@gmail.com" Date: Sun, 5 Jan 2014 18:11:02 +0000 Subject: [PATCH] an1 leak fixes. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4711 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/an1.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpsbabel/an1.cc b/gpsbabel/an1.cc index 9b1ab678b..d8d5cd136 100644 --- a/gpsbabel/an1.cc +++ b/gpsbabel/an1.cc @@ -872,7 +872,7 @@ static void Read_AN1_Lines(gbfile* f) if (rec->lineweight) { rte_head->line_width = rec->lineweight; } - rte_head->rte_name = xstrdup(rec->name); + rte_head->rte_name = rec->name; fs_chain_add(&rte_head->fs, (format_specific_data*)rec); route_add_head(rte_head); for (j = 0; j < (unsigned) rec->pointcount; j++) { @@ -883,14 +883,14 @@ static void Read_AN1_Lines(gbfile* f) wpt_tmp = waypt_new(); wpt_tmp->latitude = DecodeOrd(vert->lat); wpt_tmp->longitude = -DecodeOrd(vert->lon); - wpt_tmp->shortname = (char*) xmalloc(7); #if NEW_STRINGS wpt_tmp->shortname = QString().sprintf("\\%5.5lx", rtserial++); #else + wpt_tmp->shortname = (char*) xmalloc(7); sprintf(wpt_tmp->shortname, "\\%5.5lx", rtserial++); +#endif fs_chain_add(&wpt_tmp->fs, (format_specific_data*)vert); -#endif route_add_wpt(rte_head, wpt_tmp); } } -- 2.30.2